<?php
//验证
namespace app\modules\supplier\validate;
use think\Validate;
class SupplierPost extends Validate{
    public $rule = [
        'supplier_name'  =>['require'],
        'charge'     =>['require'],
        'charge_phone'  =>['require', 'regex' => '/^1[3-5,7,8]{1}[0-9]{9}$/'],
        'idcard'  =>['require', 'regex' => '/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/'],
    ];

    public  $field = [
        'supplier_name'  =>'供应商名称',
        'charge'     =>'负责人',
        'charge_phone'  =>'负责人电话',
        'idcard'  =>'负责人身份证号码',
    ];

}